package com.ssy.lingxi.member.merchant.api.feign.inner;

import com.ssy.lingxi.common.response.Wrapper;
import com.ssy.lingxi.member.merchant.api.fallback.inner.MemberAuthTypeConfigFeignFallback;
import com.ssy.lingxi.member.merchant.api.model.vo.inner.request.AuthConfigVO;
import com.ssy.lingxi.member.merchant.api.model.vo.inner.request.DeleteAuthConfigVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import javax.validation.Valid;

/**
 * @author lqa
 * @version 2.0.0
 * @menu 实名验证服务
 * 实名验证配置接口
 * @date 2022/1/12
 */
@FeignClient(name = "merchant-member-service", fallback = MemberAuthTypeConfigFeignFallback.class)
public interface MemberAuthTypeConfigFeign {
    /**
     * 查询当前配置的实名验证类型
     *
     * @return 实名验证类型: 1-百度，
     */
    @RequestMapping(value = "/member/config/auth/getAuthType", method = RequestMethod.POST)
    Wrapper<Integer> getAuthType();

    /**
     * 添加或修改实名验证公共参数
     *
     * @param authConfigVO 实名验证公共参数
     * @return 操作结果
     */
    @RequestMapping(value = "/member/config/auth/saveOrUpdateAuthConfig", method = RequestMethod.POST)
    Wrapper<Boolean> saveOrUpdateAuthConfig(@RequestBody @Valid AuthConfigVO authConfigVO);

    /**
     * 删除实名验证公共参数
     *
     * @param deleteAuthConfigVO 请求参数
     * @return 操作结果
     */
    @RequestMapping(value = "/member/config/auth/deleteAuthConfig", method = RequestMethod.POST)
    Wrapper<Boolean> deleteAuthConfig(@RequestBody @Valid DeleteAuthConfigVO deleteAuthConfigVO);

    /**
     * 清空实名验证内容
     *
     * @return 是否成功
     */
    @RequestMapping(value = "/member/config/auth/clearAuth", method = RequestMethod.POST)
    Wrapper<Boolean> clearAuth();
}
